{{if isset($categories['content']['categories']) && !empty($categories['content']['categories'])}}
    <section class="bg-white rounded-xl shadow-sm p-5">
        <h3 class="font-bold text-lg mb-4 flex items-center">
            <i class="fa fa-th-large text-primary mr-2"></i> 文章分类
        </h3>
        <ul class="space-y-3">
            <li class="text-primary font-medium">
                <a href="#" class="flex justify-between items-center">
                    <span><i class="fa fa-folder-open mr-2"></i> 全部分类</span>
                    <span class="bg-gray-100 rounded-full px-2 py-0.5 text-xs text-gray-600">
                        {{$categories['content']['totalArticles']}}
                    </span>
                </a>
            </li>
            {{foreach $categories['content']['categories'] as $category}}
                <li>
                    <a href="#" class="flex justify-between items-center text-gray-700 hover:text-primary transition-colors">
                        <span><i class="fa fa-folder-o mr-2"></i> {{$category['name']}}</span>
                        <span class="bg-gray-100 rounded-full px-2 py-0.5 text-xs text-gray-600">
                            {{$category['count']}}
                        </span>
                    </a>
                </li>
            {{/foreach}}
        </ul>
    </section>
{{/if}}